package reci.journal.junit;

import static org.junit.Assert.*;

import java.io.File;

import org.junit.Test;

import reci.journal.utils.DateTimeMacro;
import reci.journal.utils.ExtUtil;

public class JournalTest
{	
	@Test
	public void testNewEntryCommandDel() throws Exception
	{
		String filepath="test.txt";
		ExtUtil.copyFile("README.txt",filepath);
		assertTrue(new File(filepath).exists());
		Thread.sleep(1000);
		
		String newEntryCommandMacro="cmd /C del";
		ExtUtil.system(DateTimeMacro.process(newEntryCommandMacro)+" "+filepath);
		Thread.sleep(1000);
		
		assertFalse(new File(filepath).exists());
	}
}
